<script setup lang="ts">
import { buildAssetSource } from '@/utils';

withDefaults(defineProps<{
  size?: number
}>(), {
  size: 325
});
</script>

<template>
  <view class="empty flex-center flex-col">
    <image :src="buildAssetSource('empty.png')" :style="{ width: `${size}px`, height: `${size}px` }" />
    <view class="empty-text">
      <slot name="empty-text">
        暂无数据
      </slot>
    </view>
  </view>
</template>

<style lang="scss" scoped>
.empty {
  box-sizing: border-box;
}

.empty-text {
  font-size: 28px;
  color: var(--secondary-text-color);
}
</style>
